package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "cate_template")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class CateTemplate extends IDEntityMall {

    @Column(columnDefinition = "varchar(100) comment '名称'")
    private String name;
    @Column(columnDefinition = "varchar(100) comment '图标Url'")
    private String iconUrl;
    @Column(columnDefinition = "int comment '排序字段'")
    private Integer sort;
    @Column(columnDefinition = "bigint comment '父级id'")
    private Long parentId;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIconUrl() {
        return iconUrl;
    }

    public void setIconUrl(String iconUrl) {
        this.iconUrl = iconUrl;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    @Override
    public String toString() {
        return "CateTemplate{" +
                "name='" + name + '\'' +
                ", iconUrl='" + iconUrl + '\'' +
                ", sort=" + sort +
                ", parentId=" + parentId +
                '}';
    }
}